package com.example.chessbattleplatform.web.StorageIo.Pojo.Mapper;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder

@TableName(value = "User_file_storage", schema = "MY_DATABASE")
public class UserFileStorage {
    private String fileId;
    private Long userId;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt; // 创建时间，默认当前时间戳

    @TableField(fill =FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt; // 更新时间，每次更新时自动设置为当前时间戳
}
